

package assignment


import glpk.GlpkFileService;
import app.Constants;
import java.util.jar.Attributes.Name;

import javax.swing.text.rtf.Constants;

import grails.test.*;


class GlpkFileTests extends GrailsUnitTestCase {
	protected void setUp() {
		super.setUp()
	}

	protected void tearDown() {
		super.tearDown()
	}

	GlpkFileService f = new GlpkFileService();
	
	

	/*
	//FIXME dir not created!!
	void testCleanDirectory(){
		
		String dirPath = './testDir';
		File dir = new File(dirPath);
		File f1 = new File("$dirPath/f1");
		File f2 = new File("$dirPath/f2");
		
		assert dir.list().count == "2";
		g.cleanDirectory(dirPath);
		assert dir.list().count == "0";
	}
	
	//TODO
	void testCreateFile(){
		GLPKFile f = new GLPKFile();
		
	}
	
	//TODO
	void testWriteGLPKFile(){
		
		
	}
	
	//TODO
	void testWriteToFile(){
		GLPKFile f = new GLPKFile();
		f.writeToFile(new File('directory').mkdir(), 'fileName', 'txt', 'test');
		
		File file = new File("director/fileName.txt");
		assert file.readBytes().toString() == 'test';
	}
	*/
	
}


